package com.itheima.hotel;

public class Room {
    private String roomNumber;
    private String roomType;
    private boolean isReserved;

    public Room() {
    }

    public Room(String roomNumber, String roomType, boolean isReserved) {
        this.roomNumber = roomNumber;
        this.roomType = roomType;
        this.isReserved = isReserved;
    }

    public String printRoom() {
        return "房间号: " + roomNumber + "\t" +
                "房间类型: " + (roomType.equals("1") ? "单人间" : "双人间") + "\t" +
                "是否已预定: " + (isReserved ? "是" : "否");

    }

    @Override
    public String toString() {
        return "Room{" +
                "roomNumber='" + roomNumber + '\'' +
                ", roomType='" + roomType + '\'' +
                ", isReserved=" + isReserved +
                '}';
    }

    public String getRoomNumber() {
        return roomNumber;
    }

    public void setRoomNumber(String roomNumber) {
        this.roomNumber = roomNumber;
    }

    public String getRoomType() {
        return roomType;
    }

    public void setRoomType(String roomType) {
        this.roomType = roomType;
    }

    public boolean isReserved() {
        return isReserved;
    }

    public void setReserved(boolean reserved) {
        isReserved = reserved;
    }
}
